package cn.interestingshop.utils;

import java.util.List;

public class PageUtil<T> {
    private List<T> list;

    private int showNum = 12;

    private int beginIndex = 0;

    private int currentPage = 1;

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getShowNum() {
        return showNum;
    }

    public void setShowNum(int showNum) {
        this.showNum = showNum;
    }

    public int getBeginIndex() {
        beginIndex = (currentPage - 1) * showNum;
        return beginIndex;
    }

    public void setBeginIndex(int beginIndex) {
        this.beginIndex = beginIndex;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }
}